<?php namespace App\Http\Controllers;

use App\Extend\TestClass;
use App\Http\Requests;
use Illuminate\Http\Request;
use League\Flysystem\Adapter\Ftp;

class PublicController extends Controller {

	/**
	 * Display a listing of the resource.
	 *
	 * @return Response
	 */
	public function index()
	{
		//
	}

    public function test()
    {
        $ftp = new Ftp([
            'host' => 'www.gdyjcz.gov.cn',
            'username' => '',
            'password' => '',
        ]);
        $ftp->connect();
        print_r($ftp->listContents('.'));
    }

    public function login()
    {
        return view('auth.login');
    }

    public function doLogin(Request $request)
    {
        $this->validate($request, [
            'ip' => 'required|ip',
            'user' => 'required',
            'pass' => 'required'
        ]);
    }

	/**
	 * Show the form for creating a new resource.
	 *
	 * @return Response
	 */
	public function create()
	{
		//
	}

	/**
	 * Store a newly created resource in storage.
	 *
	 * @return Response
	 */
	public function store()
	{
		//
	}

	/**
	 * Display the specified resource.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function show($id)
	{
		//
	}

	/**
	 * Show the form for editing the specified resource.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function edit($id)
	{
		//
	}

	/**
	 * Update the specified resource in storage.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function update($id)
	{
		//
	}

	/**
	 * Remove the specified resource from storage.
	 *
	 * @param  int  $id
	 * @return Response
	 */
	public function destroy($id)
	{
		//
	}

}
